package com.desire.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Description:
 * @Author: littleDesire
 * @Date: 2022-06-07 19:13
 * @Version: 1.0
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    RestTemplate restTemplate;
    @GetMapping("/save")
    public String save() {
        System.out.println("订单保存完成");
        String s = restTemplate.getForObject("http://ERP-STOCK/stock/update", String.class);
        System.out.println(s);
        return "保存成功";
    }
}
